/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.yug.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.yug.dao.YugCategoryDao;
import com.thinkgem.jeesite.modules.yug.entity.YugCategory;

/**
 * 视频种类信息Service
 * @author Jeff
 * @version 2016-12-04
 */
@Service
@Transactional(readOnly = true)
public class YugCategoryService extends CrudService<YugCategoryDao, YugCategory> {

	public YugCategory get(String id) {
		return super.get(id);
	}
	
	public List<YugCategory> findList(YugCategory yugCategory) {
		return super.findList(yugCategory);
	}
	public Map<String,YugCategory> findMap(){
		Map<String,YugCategory> map = new HashMap<String,YugCategory>();
		List<YugCategory> list =findList(new YugCategory());
		for(YugCategory category:list){
			map.put(category.getName(), category);
		}
		return map;
	}
	public Page<YugCategory> findPage(Page<YugCategory> page, YugCategory yugCategory) {
		return super.findPage(page, yugCategory);
	}
	
	@Transactional(readOnly = false)
	public void save(YugCategory yugCategory) {
		super.save(yugCategory);
	}
	
	@Transactional(readOnly = false)
	public void delete(YugCategory yugCategory) {
		super.delete(yugCategory);
	}
	
	
}